
var detailData;
var siteBookTable;
function getoperateLogList() {
    if (typeof siteBookTable !== 'undefined') {
        siteBookTable.fnPageChange('first');
        return;
    }
    siteBookTable = $("#operateLogList").DataTable({
        "sAjaxSource": _path + "/operateLog/queryByPage",     //服务端
        "fnServerParams": function (aoData) {               //ajax请求参数
            aoData.push(
                { "name": "logtype", "value": $("#logtype").val()},
                { "name": "fromDate", "value": $("#fromDate").val() },
                { "name": "toDate", "value": $("#toDate").val() }
            );
        },
        "fnServerData": function(sUrl, aoData, fnCallback) {
            var data = new Array();
            for(var i in aoData)
                data.push(aoData[i].name + '=' + aoData[i].value);
            $.ajax( {
                "type": "POST",
                "url": sUrl,
                "dataType": "json",
                "data": data.join('&'),
                "success": function(resp) {
                    detailData = resp.dataList;
                    fnCallback(resp);
                }
            });
        },
        "sServerMethod": "POST",    //请求方式
        "sAjaxDataProp": "dataList",//后台返回数据名
        "aoColumns": [
            { "sTitle": "用户ID", "sWidth": "6%", mData: "userid" },
            { "sTitle": "操作类型", "sWidth": "6%", mData: "logtype" },
            { "sTitle": "用户IP", "sWidth": "6%", "mData": "ip" },
            { "sTitle": "操作时间", "sWidth": "6%", "mData": "opertime" }
        ]
    });
}